package com.kongxx.struts2study.host.web.action;

import java.util.List;

import com.kongxx.struts2study.common.web.action.BaseAction;
import com.kongxx.struts2study.host.model.Host;
import com.kongxx.struts2study.host.service.HostService;

public final class HostListAction extends BaseAction {

	private static final long serialVersionUID = 1L;
	
	private List<Host> hosts;
	
	private HostService hostService;
	
	@Override
	public String execute() throws Exception {
		hosts = hostService.list();
		return SUCCESS;
	}

	public List<Host> getHosts() {
		return hosts;
	}

	public void setHosts(List<Host> hosts) {
		this.hosts = hosts;
	}
	
	public HostService getHostService() {
		return hostService;
	}

	public void setHostService(HostService hostService) {
		this.hostService = hostService;
	}
}
